package com.hu.mapper;

import com.hu.pojo.User;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

public class UserMapperImpl extends SqlSessionDaoSupport implements UserMapper {
    @Override
    public List<User> select() {
        add(new User(8,"hah","123456"));
        delete(8);
        return getSqlSession().getMapper(UserMapper.class).select();
    }

    @Override
    public int add(User user) {
        return getSqlSession().getMapper(UserMapper.class).add(user);
    }

    @Override
    public int delete(int id) {
        return getSqlSession().getMapper(UserMapper.class).delete(id);
    }
}
